import Layout from '../components/Layout'


let routes =
  [
    {
      path: '/',
      component: Layout,
      meta: {
        hidden: true,
        title: '根目录'
      },
      redirect: { path: '/dashboard' },
      children:
        [
          {
            path: 'dashboard',
            name: 'dashboard',
            meta: {
              icon: "el-icon-house",
              title: '仪表盘',
            },
            component: () => import('../views/dashboard')
          },

        ]
    },
    {
      path: '/system',
      component: Layout,
      name: 'system',
      meta: {
        icon: "el-icon-setting",
        title: '系统设置',
      },

      children:
        [
          {
            path: 'user',
            meta: {
              icon: "el-icon-user",
              title: "用户设置",
            },

            name: 'user',
            component: () => import('../components/User'),
            children:
              [
                {
                  path: 'users',
                  meta: {
                    icon: "#el-icon-user",
                    title: '用户',
                  },
                  component: () => import('../views/users'),
                },
                {
                  path: 'password',
                  meta: {
                    icon: "#el-icon-user",
                    title: '用户',
                  },
                  component: () => import('../components/Password'),
                },

              ]
          },
          {
            path: 'role',
            meta: {
              title: '角色设置',
            },

            name: 'role',
            component: () => import('../components/Role'),
            children:
              [
                {

                  path: 'home',
                  meta: {
                    icon: "#el-icon-user",
                    title: '上架商品',
                  },
                  component: () => import('../components/Home')
                },
                {
                  path: 'admin',
                  meta: {
                    icon: "#el-icon-user",
                    title: '人',
                  },

                  component: () => import('../components/Admin')
                },

              ]
          },
          {
            path: 'userRole',
            meta: {
              title: '用户角色',
              icon: "el-icon-user"
            },
            name: 'userRole',
            component: () => import('../components/UserRole')
          }


        ]

    },
    {
      path: '/log',
      component: Layout,
      redirect: { path: '/log/auditinfo' },
      meta: {
        title: '系统日志',
        icon: 'el-icon-coin',
        hidden: true,
      },
      children: [
        {
          path: 'auditinfo',
          name: 'auditinfo',
          meta: {
            title: '审计日志',
            icon: 'el-icon-coin',
          },
          component: () => import('../views/log'),
        },
      ],
    },
    {
      path: '/login',
      meta: {
        title: "登录",
        hidden: false
      },
      component: () => import('../views/login')
    },

    {
      path: '/wq',
      meta: {
        title: "Wq",
        hidden: false
      },
      component: () => import('../components/Wq')
    }



  ]

export default routes;

